<script setup>
import { ElButton } from 'element-plus'
import { defineProps, computed } from 'vue'
import { isDark } from "@/utils/dark";

const props = defineProps({
    type: String
})
const typeColor = {
    default: null,
    primary: '#004EF5',
    success: '#67c23a',
    info: '#909399',
    warning: '#e6a23c',
    danger: '#f56c6c',
}
const buttonColor = computed(() => {
    return typeColor[props.type] || 'default'
})
</script>

<template>
    <el-button :color="buttonColor" :dark="isDark">
        <slot />
    </el-button>
</template>

<style scoped>

</style>